import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import NotFound from "@/views/404.vue";
import Login from "@/views/login.vue";
import Home from "@/views/Home.vue";

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Home',
    component: Home,
  },
  {
    path: '/login',
    name: 'Login',
    component: Login,
  },
  { path: "/:pathMatch(.*)*", name: "NotFound", component: NotFound },
  { path: '/', redirect: { name: 'Login' } },
]
const router = createRouter({
  history: createWebHistory(),
  routes
})
export default router
